/**
 * @name 登录模块
 */

import axios from "axios";

const huanjing = import.meta.env.VITE_TYPE as string;
const url = huanjing === "dev" ? "http://121.40.63.233:8090" : "http://niubi:8090";

// * 用户列表接口
export const wordList = (data: any) => {
	return axios.post(url + `/api/v1/article/queryAllInfo`, data);
};

// * 新增 or 编辑 用户接口
export const changeWordList = (data: any) => {
	return axios.post(url + `/api/v1/article/saveInfo`, data);
};

// * 新增 or 编辑 用户接口
export const detWordList = (data: any) => {
	return axios.get(url + `/api/v1/article/queryInfoById`, {
		params: {
			id: data
		}
	});
};

// * 新增 or 编辑 用户接口
export const statusUserList = (data: any) => {
	return axios.get(url + `/api/v1/article/updateInfoStatus`, {
		params: data
	});
};
